<%@include file="_header.jsp"%>
<title>${inhoud.confirmationTitle}</title>
</head>
<body>	
    <c:choose>
        <c:when test="${userLevel == null}">
            <%@include file="errorPage.jsp"%>
        </c:when><c:otherwise>
            <%@include file="_menu.jsp"%>
            <div class="sidebar">

                <div class="redbar"><a href="#"><div id="bar-textcontent">${inhoud.confirmationTitle}</div></a>
                </div>
                <div id="sidescreen">

                    <ul class="thumbnails">
                        <li class="span4">
                            <div class="thumbnail">
                                <h3>${inhoud.confirmationT}</h3>
                                <img src="icons/view_courses.png" alt="">

                                <p></p>
                            </div>
                        </li>
                    </ul>


                </div>



            </div>

            <div class="wrappermain">


                <div class="digitalclass">
                    <div id="subheader">  </div>
                 <div class="main-digital">
                        <h2>${inhoud.confirmationT2}</h2>
                        <p>
                        <h4>${inhoud.confirmationT3}:</h4>
                        <table>
                            <tr>
                                <td>${inhoud.username}: </td>
                                <td>${gebruikerinfo.gebruikersnaam}</td>
                            </tr>
                            <tr>
                                <td>${inhoud.firstName}: </td>
                                <td>${gebruikerinfo.voornaam}</td>
                            </tr>
                            <tr>
                                <td>${inhoud.lastName}:</td>
                                <td>${gebruikerinfo.achternaam}</td>
                            </tr>
                            <tr>
                                <td>E-mail: </td>
                                <td>${gebruikerinfo.email}</td>
                            </tr>
                        </table>
                        </p>
                        </br>

                        <c:if test="${courseinfo != null}">
                            <c:set var="course" value="${courseinfo}" />
                            <p>
                            <h4>${inhoud.confirmationT4}:</h4>
                            <table>
                                <tr>
                                    <td>${inhoud.changeCourseT}: </td>
                                    <td>${courseinfo.courseName}</td>
                                </tr>
                                <tr>
                                    <td>${inhoud.changeCourseT3}: </td>
                                    <td>${courseinfo.courseLanguage}</td>
                                </tr>
                                <tr>
                                    <td>${inhoud.changeCourseT2}: </td>
                                    <td>${courseinfo.courseDescription}</td>
                                </tr>
                                <tr>
                                    <td>${inhoud.changeCourseT4} </td>
                                    <td>
                                        <%
                                            HttpSession sessie = request.getSession();
                                            InhoudBean1 inhoudBean1 = (InhoudBean1) sessie.getAttribute("inhoud");
                                            Course course = (Course) pageContext.getAttribute("course");
                                            String price = inhoudBean1.getAmount(Double.parseDouble(course.getPrice()));
                                        %>
                                        ${inhoud.currencySymbol}<%= price%>
                                    </td>
                                </tr>
                            </table>
                            </p>



                            ${inhoud.confirmationT5}
                            <a href="payment?id=${courseinfo.courseID}"><img src="icons/next_button.png"></a>

                            </br>
                            </br>

                            ${inhoud.confirmationT6}
                            <a href="subscribe_to_course"><img src="icons/back_button.png"></a>

                        </c:if>


                        <c:if test="${combicourseinfo != null}">
                            <p>
                            <h4>${inhoud.confirmationT4}:</h4>
                            <table>
                                <tr>
                                    <td>${inhoud.changeCourseT}: </td>
                                    <td>${inhoud.changeCourseT3}: </td>
                                    <td>${inhoud.changeCourseT2}: </td>
                                    <td>${inhoud.changeCourseT4} </td>              
                                </tr>

                                <c:forEach var="coursecombitemp" items="${combicourseinfo}">
                                    <c:set var="course2" value="${coursecombitemp}" />
                                    <tr>
                                        <td>${coursecombitemp.courseName}</td>
                                        <td>${coursecombitemp.courseLanguage}</td>
                                        <td>${coursecombitemp.courseDescription}</td> 
                                        <td><%
                                            HttpSession sessie3 = request.getSession();
                                            InhoudBean1 inhoudBean = (InhoudBean1) sessie3.getAttribute("inhoud");
                                            Course course2 = (Course) pageContext.getAttribute("course2");
                                            String price2 = inhoudBean.getAmount(Double.parseDouble(course2.getPrice()));
                                            %>
                                            ${inhoud.currencySymbol}<%= price2%></td>
                                    </tr>
                                </c:forEach>
                                <tr><td>--------------------------</td></tr>
                                <tr>
                                    <td>${inhoud.confirmationT7}:</td><td>${inhoud.currencySymbol}${totalprice}</td>
                                </tr>
                            </table>
                            </p>

                            </br>
                            ${inhoud.confirmationT5}
                            <a href="payment?course1=${course1}&course2=${course2}&course3=${course3}&course4=${course4}"><img src="icons/next_button.png"></a>

                            </br>
                            </br>

                            ${inhoud.confirmationT6}
                            <a href="combination_deals"><img src="icons/back_button.png"></a>


                        </c:if>

                    </div>
                </div>
            </div>
        </c:otherwise></c:choose>
</body>
</html>
